#!/usr/bin/perl
 
#CREATE AN ARRAY
 
@perl_array = (3, 4, 1, 2);
@sorted_array1 = sort @perl_array;
@sorted_array2 = sort {$b <=> $a} @perl_array;
 
print "@sorted_array1 \n";
print "@sorted_array2 \n"; 